namespace EyeOpen.Validation
{
    using System.Collections.Generic;

    /// <summary>
    /// Defines contract for a class that implements an entity validation.
    /// </summary>
    /// <typeparam name="T">The type of entity to validate.</typeparam>
    public interface IEntityValidator<in T> where T : class
    {
        /// <summary>
        /// Determines whether the specified entity is valid.
        /// </summary>
        /// <param name="obj">The obj.</param>
        /// <returns>
        /// <c>true</c> if the specified entity is valid; otherwise, <c>false</c>.
        /// </returns>
        bool IsValid(T obj);

        /// <summary>
        /// Gets the entity validation messages.
        /// </summary>
        /// <value>The entity validation messages.</value>
        IEnumerable<ValidationResult> ValidationResults
        { 
            get;
        }
    }
}